<?#//v.3.0.0
#///////////////////////////////////////////////////////
#//  COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//
#///////////////////////////////////////////////////////
?>
<?
$TMP_usmenutitle=$MGS_2__0056;
include phpa_include("template_user_menu_header.html");
?>
<SCRIPT Language=Javascript>
function ConfirmDel(){
	if(confirm('<?=$MSG_30_0087?>')){
		document.open.submit();
	}else{
		document.open.reset();
	}
}
function selectAllDelete(formObj, isInverse) 
{
   for (var i=0;i < formObj.length;i++) 
   {
      fldObj = formObj.elements[i];
      if (fldObj.type == 'checkbox' && fldObj.name.substring(0,8)=='O_delete')
      { 
         if(isInverse)
            fldObj.checked = (fldObj.checked) ? false : true;
         else fldObj.checked = true; 
       }
   }
}
</SCRIPT>
<form name="open" method="post" action="<?=basename($_SERVER[PHP_SELF])?>">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="CENTER">
        <tr>
            <td class=white colspan="8" align=right>
                <div>
                    <dl class="phpa-tabs">
                        <dd> <a href=yourauctions_p.php>
                            <?=$MSG_25_0115?>
                            </a> </dd>
                        <dd> <a href=yourauctions.php>
                            <?=$MSG_619?>
                            </a> </dd>
                        <dd> <a href=yourauctions_c.php>
                            <?=$MSG_204?>
                            </a> </dd>
                        <dd> <a href=yourauctions_sold.php>
                            <?=$MSG_25_0119?>
                            </a> </dd>
                    </dl>
                </div>
            </td>
        </tr>
        </TABLE>
	<table width="100%" border="0" cellspacing="1" cellpadding="4" align="CENTER">
	<tr bgcolor="<?=$SETTINGS[bordercolor]?>">
            <td class=titTable1 class=white width="32%"> <a href=<?=basename($_SERVER['PHP_SELF'])?>?sa_ord=title&sa_type=<?=$_SESSION['sa_nexttype']?>>
                <?=$MSG_624?>
                </a>
                <?
                if($_SESSION['sa_ord'] == 'title') {
		?>
                <a href=<?=basename($_SERVER['PHP_SELF'])?>?sa_ord=title&sa_type=<?=$_SESSION['sa_nexttype']?>>
                <?=$_SESSION['sa_type_img']?>
                </a>
                <?
                }
		?>
            </td>
            <td class=titTable1 class=white width="11%"> <a href=<?=basename($_SERVER['PHP_SELF'])?>?sa_ord=starts&sa_type=<?=$_SESSION['sa_nexttype']?>>
                <?=$MSG_625?>
                </a>
                <?
                if($_SESSION['sa_ord'] == 'starts') {
					  ?>
                <a href=<?=basename($_SERVER['PHP_SELF'])?>?sa_ord=starts&sa_type=<?=$_SESSION['sa_nexttype']?>>
                <?=$_SESSION['sa_type_img']?>
                </a>
                <?
                }
		?>
            </td>
            <td class=titTable1 class=white width="11%"> <a href=<?=basename($_SERVER['PHP_SELF'])?>?sa_ord=ends&sa_type=<?=$_SESSION['sa_nexttype']?>>
                <?=$MSG_626?>
                </a>
                <?
                if($_SESSION['sa_ord'] == 'ends') {
					  ?>
                <a href=<?=basename($_SERVER['PHP_SELF'])?>?sa_ord=ends&sa_type=<?=$_SESSION['sa_nexttype']?>>
                <?=$_SESSION['sa_type_img']?>
                </a>
                <?
                }
		?>
            </td>
            <td class=titTable1 class=white width="9%" align=center>
                <?=$MSG__0153?>
            </td>
            <td class=titTable1 class=white width="7%" align=center> <a href=<?=basename($_SERVER['PHP_SELF'])?>?sa_ord=num_bids&sa_type=<?=$_SESSION['sa_nexttype']?>>
                <?=$MSG_627?>
                </a>
                <?
                if($_SESSION['sa_ord'] == 'num_bids') {
					  ?>
                <a href=<?=basename($_SERVER['PHP_SELF'])?>?sa_ord=num_bids&sa_type=<?=$_SESSION['sa_nexttype']?>>
                <?=$_SESSION['sa_type_img']?>
                </a>
                <?
                }
		?>
            </td>
            <td class=titTable1 width="10%" align=center> <a href=<?=basename($_SERVER['PHP_SELF'])?>?sa_ord=current_bid&sa_type=<?=$_SESSION['sa_nexttype']?>>
                <?=$MSG_628?>
                </a>
                <?
                if($_SESSION['sa_ord'] == 'current_bid') {
		?>
                <a href=<?=basename($_SERVER['PHP_SELF'])?>?sa_ord=current_bid&sa_type=<?=$_SESSION['sa_nexttype']?>>
                <?=$_SESSION['sa_type_img']?>
                </a>
                <?
                }
		?>
            </td>
            <td class=titTable1 width="6%" align=center>
                <?=$MSG_298?>
            </th>
            <td class=titTable1 width="8%" align=center>
                <?=$MSG_008?>
            </td>
        </tr>
        <?
        if(is_array($IDS)) {
        	while(list($k,$v) = each($IDS)) {
			  ?>
        <tr bgcolor="#EEEEEE">
            <td class=white width="32%"> <a href="item.php?id=<?=$IDS[$k]?>">
                <?=$TITLE[$k]?>
                </a></td>
            <td class=white width="11%">
                <?=FormatDate($STARTS[$k])?>
            </td>
            <td class=white width="11%">
                <?=FormatDate($ENDS[$k])?>
            </td>
            <td class=white width="9%"  align=CENTER>
                <?
                if($RELIST[$k] == 0) {
                	print "--";
                } else {
                	print $RELIST[$k]." / ".$RELISTED[$k];
                }
					?>
            </td>
            <td class=white width="7%"  align=CENTER>
                <?=$BIDS[$k]?>
            </td>
            <td class=white width="10%"  align=CENTER>
                <?
                if($BID[$k] == 0) {
                	print "-";
                } else {
                	print print_money($BID[$k]);
                }
				  ?>
            </td>
            <td class=white width="6%"  align=CENTER>
                <?
                if($BID[$k] == 0) {
				?>
                <a href="edit_active_auction.php?id=<?=$IDS[$k]?>"><img src="images/edititem.gif" width="13" height="17" alt="<?=$MSG_632?>" border="0"></a>
                <?
                } else {
                	print "&nbsp;";
                }
				  ?>
            </td>
            <td class=white width="8%"  align=CENTER>
                <? 
                if($BID[$k] == 0) {
				?>
                <input type="checkbox" name="O_delete[]" value="<?=$IDS[$k]?>">
                <?
                } else {
                	print "&nbsp;";
                }
				 ?>
            </td>
        </tr>
        <?
        	}
        }
			  ?>
        <tr>
  		<TR bgcolor="<?=$BGCOLOR?>">
		<TD colspan=7>&nbsp;</TD>
		<TD align=center><a href="javascript: void(0)" onclick="selectAllDelete(document.open,1)"><?=$MSG_30_0102?></A></TD>
		</TR>
            <td class=white colspan="8" align="center">
                <input type="hidden" name="action" value="delopenauctions"  />
                <input type="submit" name="Submit" value="<?=$MSG_631?>"  class=button onClick=ConfirmDel() />
            </td>
        </tr>
    </table>
</form>
<table width=100%cellpadding=0 cellspacing=0 border=0>
    <tr>
        <td align=center>
            <?=$MSG_5117?>
&nbsp;&nbsp;
            <?=$PAGE?>
            <?=$MSG_5118?>
&nbsp;&nbsp;
            <?=$PAGES?>
            <br>
            <?
            $PREV = intval($PAGE - 1);
            $NEXT = intval($PAGE  + 1);
            if($PAGES > 1) {
            	if($PAGE > 1) {
			?>
            <a href="<?=basename($_SERVER[PHP_SELF])?>?PAGE=<?=$PREV?>"><u>
            <?=$MSG_5119?>
            </u></a> &nbsp;&nbsp;
            <?
            	}
            	$LOW = $PAGE - 5;
            	if($LOW <= 0) $LOW = 1;
            	$COUNTER = $LOW;
            	while($COUNTER <= $PAGES && $COUNTER < ($PAGE+6)) {
            		if($PAGE == $COUNTER) {
            			print "<B>$COUNTER</B>&nbsp;&nbsp;";
            		} else {
            			print "<A HREF=\"".basename($_SERVER[PHP_SELF])."?PAGE=$COUNTER\"><U>$COUNTER</U></A>&nbsp;&nbsp;";
            		}
            		$COUNTER++;
            	}
			?>
&nbsp;&nbsp;
            <?
            if($PAGE < $PAGES) {
			?>
            <a href="<?=basename($_SERVER[PHP_SELF])?>?PAGE=<?=$NEXT?>"><u>
            <?=$MSG_5120?>
            </u></a>
            <?
            }
            }
			?>
        </td>
    </tr>
</table>
<?
include phpa_include("template_user_menu_footer.html");
?>
